/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface FireDrill extends BasicModel<FireDrill> {
  enterpriseId?: string; // 企业ID
  enterpriseName?: string; // 企业名称
  buildId?: number; // 建筑ID
  buildName?: string; // 建筑名称
  regionId?: number; // 区域ID
  regionIname?: string; // 区域名称
  fireName?: string; // 火情名称
  location?: string; // 详细地址
  fireConfirmTime?: string; // 火情确认时间
  fireUserId?: string; // 确认用户ID
  fireUserName?: string; // 确认用户姓名
  fireInitiatorUser?: string; // 火情发起人
  fireInitiatorUserId?: string; // 火情发起人ID
  rescueTime?: string; // 救援时间
  endTime?: string; // 结束时间
  createTime?: string; // 创建时间
  updateTime?: string; // 更新时间
  fireVideo?: string; // 火情视频URL
  fireExecutionStatus?: string; // 火情状态（已发生/已结束）
  commander?: string; // 指战员
  linkageLevel?: string; // 演练联动级别
  confirmFireFile?: string; // 火情结束照片URL
  confirmFireFileId?: string; // 火情结束照片ID
  latitude?: string; // 纬度
  longitude?: string; // 经度
  FireInfoId?: number; // 火情信息ID
}

export const fireDrillList = (params?: FireDrill | any) =>
  defHttp.get<FireDrill>({ url: adminPath + '/drill/fireDrill/list', params });

export const fireDrillListData = (params?: FireDrill | any) =>
  defHttp.post<Page<FireDrill>>({ url: adminPath + '/drill/fireDrill/listData', params });

export const fireDrillForm = (params?: FireDrill | any) =>
  defHttp.get<FireDrill>({ url: adminPath + '/drill/fireDrill/form', params });

export const fireDrillSave = (params?: any, data?: FireDrill | any) =>
  defHttp.postJson<FireDrill>({ url: adminPath + '/drill/fireDrill/save', params, data });

export const fireDrillDelete = (params?: FireDrill | any) =>
  defHttp.get<FireDrill>({ url: adminPath + '/drill/fireDrill/delete', params });

export const fireDrillEnded = (params?: FireDrill | any) =>
  defHttp.post<FireDrill>({ url: adminPath + '/drill/fireDrill/fireEnded', params });

